#include "ParticleCeramic.h"

#include "ParticleContext.h"
#include "DescriptorParticle.h"

using namespace ParticleEngine; 

const DescriptorParticle ParticleCeramic::Descriptor
(
	"Ceramic", 
	[](ParticleContext& NewContext) { return new ParticleCeramic(NewContext); }
); 

ParticleCeramic::ParticleCeramic(ParticleContext& NewContext) :
ParticleBase(NewContext, &ParticleCeramic::Descriptor),
Heat(0.002f)
{
	Adhesions = new PropertyAdhesions(0.03f);
	Adhesions->ParticleCast = this;
}
ParticleCeramic::~ParticleCeramic()
{
}

void ParticleCeramic::Sole()//einzelne aktualisierzung
{
	this->SoleStandard();

	this->Heat.Sole();
}
void ParticleCeramic::InteractionIndividual(ParticleBase*const Other, Vec<2, float>& Space, const float& DistanceSquared)
{
	this->InteractionKinetics(Other, Space, DistanceSquared);

	this->Heat.Interaction(Other->HasHeat());
}
ColorRGBA<unsigned char> ParticleCeramic::GetColor()
{
	return ColorRGBA<unsigned char> (220, 220, 220, 255);
}

void ParticleCeramic::SaveIndividual(std::ofstream& Strm)
{
	Heat.Save(Strm);
}
void ParticleCeramic::LoadIndividual(std::ifstream& Strm)
{
	Heat.Load(Strm);
}


